import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;

public class TennisGameMain {
    public static void main(String[] args) throws IOException {
        TennisGame newGame = new TennisGame(new BufferedReader(new InputStreamReader(System.in)), new PrintStream(System.out));
        RandomScore randomScore = new RandomScore(newGame);
        int firstPlayerPoints =   newGame.getFirstPlayerPoints();
        int secondPlayerPoints =   newGame.getSecondPlayerPoints();
        System.out.println(newGame.getScore(firstPlayerPoints,secondPlayerPoints));
        CalculateScore calculateScore = new CalculateScore();
//        while(!newGame.hasWinner()){
//            randomScore.score();
//            System.out.println(newGame.getScore(newGame.getFirstPlayerPoints(),newGame.getSecondPlayerPoints()));
//        }

        newGame.run();

    }
}